<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    //1.无参无返回值
    function f1() {
        console.log("f1");
    }
    f1();
    //2.有参无返回值
    function f2(name,age) {
        console.log(name+":"+age)
    }
    console.log("wcj",24);
    //3.无参有返回值
    function f3() {
        return "我是返回值";
    }
    let f4 = f3();
    console.log(f4);
    //4.有参有返回值
    function f5(name,age) {
        return name+":"+age ;
    }
    let f6 = f5("wy",18);
    console.log(f6);
    let f7 = function (name,age) {
        console.log(name+":"+age);
    }
    f7("wcw",25);
    let f8 = new Function("name","age","console.log(name+':'+age)")
    f8("www",23)
</script>
</body>
</html>